package cn.gok.oop.homework;



public class SuperWorker extends Worker {

    double bonus ;//奖金系数

    public SuperWorker(String name, String job, int salary, double bonus) {
        super(name, job, salary);
        this.bonus = bonus;
    }


    @Override
    public double doJob(int month) {
        return super.doJob(month)*(1+bonus);
    }
    public double doJob(int month,int addtionalHours) {
        return (super.doJob(month)*(1+bonus)+bonus*super.getSalary()*addtionalHours/100);
    }
}
